//
//  HeaderCell.m
//  FreeReading
//
//  Created by lanou3g on 15/10/28.
//  Copyright © 2015年 lanou3g. All rights reserved.
//

#import "HeaderCell.h"
#import "HeaderViewForSection.h"

@implementation HeaderCell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.headerView = [[HeaderViewForSection alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 80)];
        
        [self.contentView addSubview:self.headerView];
        
    }
    return  self;
}

#pragma mark - 实现方法
-(void)loadHeaderImageWith:(NSString *)url isShowMore:(NSString *)showMore
{
    if ([showMore isEqualToString:@"N"]) {
        self.headerView.moreImage.image = [UIImage imageNamed:@""];
    }
    
    [self.headerView.headerViewForSection sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:nil];
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
